package com.xz.demo.director;

import com.xz.demo.builder.Builder;
import com.xz.demo.model.Product;

/**
 * @author 张志航     
 * @version V1.0.0
 * @projectName design_mode
 * @title     Director   
 * @package    com.xz.demo.director  
 * @date   2019/11/27 18:32  
 * @explain
 */
public class Director {

    private Builder builder;

    public Director(Builder builder) {
        this.builder = builder;
    }

    public Product construct(){
        builder.buildPartA();
        builder.buildPartB();
        builder.buildPartC();
        return builder.getResult();
    }
}
